package com.gz.slin.weixin.controller;

import com.gz.slin.weixin.pojo.WeixinAccount;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/8/17.
 */


@Controller
@RequestMapping("/weixinAccount")
public class WeixinAccountController {


    @RequestMapping("/load")
    public String load(HttpServletRequest request) {

        return "/weixin/weixinAccount/weixinAccountList";
    }

    /**
     * 查询公众号列表
     * @param request
     * @return
     */
    @RequestMapping("/list")
    @ResponseBody
    public List<WeixinAccount> list(HttpServletRequest request) {

        WeixinAccount o1=new WeixinAccount();
        WeixinAccount o2=new WeixinAccount();
        WeixinAccount o3=new WeixinAccount();
        WeixinAccount o4=new WeixinAccount();
        o1.setAccountname("o1");
        o2.setAccountname("o2");
        o3.setAccountname("o3");
        o4.setAccountname("o4");
        List<WeixinAccount> list=new ArrayList<>();
        list.add(o1);
        list.add(o2);
        list.add(o3);
        list.add(o4);
        return list;
    }
}
